<?php (!defined('IN_SYSTEM') || !defined('ADMIN_PRE')) && exit('Access Denied!');?>
{admintemplate header}
<div class="box">
 	<div class="heading">
		<h1>创建页面</h1>
	<div class="buttons">
	<a href="<?php echo url('admin.php?m=page')?>" >页面列表</a>
	</div>	
	</div>
<script type="text/javascript">
function check_form(form) {
	if (form.title.value == '') {
		alert('请输入页面名称。');
		form.title.focus();
		return false;
	}
	return true;
}
</script>
	<div class="main">

	<form name="save" method="post" action="?m=page&f=save" onsubmit="return check_form(this)">
	<input type="hidden" name="savetype" value="<?php echo $page['savetype']?>" />
	<input type="hidden" name="id" value="<?php echo $page['id']?>" />
		<table class="sub">
			<tr>
				<td width="80">页面标题：</td>
				<td><input type="text" name="title" id="title" class="input" size="70" value="<?php echo $page['title']?>" /> <span>显示在标题栏</span></td>
			</tr>
			<tr>
				<td >页面名称：</td>
				<td><input type="text" name="pagename" class="input" size="70" value="<?php echo $page['pagename']?>" /> <span>链接文字，留空则使用标题作为页面名称</span></td>
			</tr>
			<tr>
				<td>URL别名：</td>
				<td><input type="text" name="urlname" id="urlname" class="input" size="70" value="<?php echo $page['urlname']?>"  onblur="check_urlname()"/>  <input type="checkbox" onclick="getalias(this)"/>自动获取    <span id="tip_urlname">html页面的名称，由英文、数字、下划线、减号组成，留空则使用页面ID号</span></td>
			</tr>
			<tr>
				<td>排序：</td>
				<td><input type="text" name="orderid" class="input" size="8" value="<?php echo $page['orderid']?>" /> <span>按从小到大排列</span></td>
			</tr>
			<tr>
				<td>是否显示：</td>
				<td>
				<input type="radio" name="ishide" class="radio" value="0" <?php if(!$page['ishide']) echo 'checked="checked"';?> />是
				<input type="radio" name="ishide" class="radio" value="1" <?php if($page['ishide']) echo 'checked="checked"';?> />否
				</td>
			</tr>
			<tr>
				<td>关键字：</td>
				<td valign="top">
				<input type="checkbox" name="show_keywords" value="1" onclick="$('#keywords').toggle()" id="show_keywords"  class="checkbox" /><label for="show_keywords">编辑Meta keywords标签内容。</label></td>
			</tr>
			<tbody id="keywords" style="display:none;">
			<tr>
				<td></td><td><textarea name="keywords" rows="5" cols="50"><?php echo $page['keywords']?></textarea></td>
			</tr>
			</tbody>
			<tr>
				<td>页面描述：</td>
				<td valign="top">
				<input type="checkbox" name="show_description" value="1" onclick="$('#description').toggle()" id="show_description"  class="checkbox" /><label for="show_description">编辑Meta Description标签内容。</label></td>
			</tr>
			<tbody id="description" style="display:none;">
			<tr>
				<td></td><td><textarea name="description" rows="5" cols="50"><?php echo $page['description']?></textarea></td>
			</tr>
			</tbody>
			<tr>
				<td>附件上传：</td>
				<td><input type="checkbox" name="show_upload" value="1" onclick="$('#upload').toggle()" id="show_upload"  class="checkbox" /><label for="show_upload">上传附件</label></td>
			</tr>
			<tbody id="upload" style="display:none;">
			<tr>
				<td></td>
				<td><iframe src="admin.php?m=upload" width="100%" height="160" id="upload" name="upload" frameborder="0" scrolling="auto" ></iframe></td>
			</tr>
			</tbody>
			<tr>
				<td valign="top">页面内容：</td><td><?php echo editor('content','content',$page['content'],'default','100%','300px',true)?></td>
			</tr>
			<tr>
			<td></td><td>
				<input type="submit" class="button" value="保存页面" />
				<input type="button" class="button" value="返回上一页" onclick="history.back()" />
			</td>
			</tr>
		</table>
	</form>
	</div>
</div>
{admintemplate footer}